package com.ynny.demo08;

import java.time.LocalDateTime;
import java.util.Scanner;

public class XunHuan {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.print("输入任何字符继续循环，输入'n'退出：");
            String sc = scanner.nextLine();
            if (sc.equals("n")) {
                break;
            } else {

                LocalDateTime now = LocalDateTime.now();

                System.out.println( "：循环操作中~~~ 按n退出循环");
            }
        }
        scanner.close();
        System.out.println("退出循环。");
    }
}
